Skip to content

Conversation

@erikayao93
Copy link

@erikayao93 erikayao93 commented Sep 5, 2024

Problem

Without an SSO connection, code suggestions may still have references even if they have opted out in their settings.

Solution

When generating a recommendation request, always provide the isSuggestionsWithCodeReferencesEnabled flag from configuration. This will default to false if the config is not found.


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@erikayao93 erikayao93 requested a review from a team as a code owner September 5, 2024 16:46
@github-actions
Copy link

github-actions bot commented Sep 5, 2024

This pull request modifies files in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@erikayao93 erikayao93 changed the title Add code reference opt-in config to non-SSO requests fix(amazonq): Add code reference opt-in config to non-SSO requests Sep 5, 2024
@github-actions
Copy link

github-actions bot commented Sep 5, 2024

This pull request modifies a feature or fixes a bug, but it does not include a changelog entry. All pull requests that introduce new features or bug fixes must have a corresponding changelog item describing the changes.

Copy link

@mr-lee mr-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with a nitpick.

export async function buildGenerateRecommendationRequest(editor: vscode.TextEditor): Promise<{
export async function buildGenerateRecommendationRequest(
editor: vscode.TextEditor,
allowCodeWithReference: boolean
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - align it with the API definition - allowRecommendationsWithReferences?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I based it off of the same parameter in buildListRecommendationRequest here

@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@justinmk3
Copy link
Contributor

justinmk3 commented Jan 14, 2025

Please note:

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.

    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

Is there a reason a changelog wasn't added?

@erikayao93
Copy link
Author

I didn't realize this pull request was still open, apologies. I'll reopen this pull request at a later time when I have some time to re-sync my fork and update the changelog.

@erikayao93 erikayao93 closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants